<!doctype html><html lang=en-us dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="将安卓手机用于开发 # Termux # 类似于WIN端的Subsystem——其实更像Ubuntu下的虚拟终端。 不过这东西功能强大，除了将安卓里的Linux发挥出来。还有Termux API来调用手机的底层接口。
XFCE4 # 步骤：
安装Termux 执行pkg update 执行pkg install git && git clone https://github.com/Yisus7u7/termux-desktop-xfce.git 执行cd termux-desktop-xfce && bash boostrap.sh 当然，3&amp;4步可以合并为一句curl -sLf https://raw.githubusercontent.com/Yisus7u7/termux-desktop-xfce/main/boostrap.sh | bash
VNC # 默认VNC只能通过localhost:1来连接，局域网不能访问。想用大屏来看就不是很方便。
# 先执行`vncserver`使用本机的`VNC Viewer`看看效果，主要是需要先设置一下密码 vncserver # 现在还无法通过局域网连接 # 去设置 cd ~/.vnc/ vim config # 打开最后一行注释 # 重新运行 vncserver -kill :1 vncserver 配置文件一览 # 将config文件最后一行的注释打开，即可
## Supported server options to pass to vncserver upon invocation can be listed ## in this file."><meta name=theme-color content="#FFFFFF"><meta name=color-scheme content="light dark"><meta property="og:title" content="安卓"><meta property="og:description" content="将安卓手机用于开发 # Termux # 类似于WIN端的Subsystem——其实更像Ubuntu下的虚拟终端。 不过这东西功能强大，除了将安卓里的Linux发挥出来。还有Termux API来调用手机的底层接口。
XFCE4 # 步骤：
安装Termux 执行pkg update 执行pkg install git && git clone https://github.com/Yisus7u7/termux-desktop-xfce.git 执行cd termux-desktop-xfce && bash boostrap.sh 当然，3&amp;4步可以合并为一句curl -sLf https://raw.githubusercontent.com/Yisus7u7/termux-desktop-xfce/main/boostrap.sh | bash
VNC # 默认VNC只能通过localhost:1来连接，局域网不能访问。想用大屏来看就不是很方便。
# 先执行`vncserver`使用本机的`VNC Viewer`看看效果，主要是需要先设置一下密码 vncserver # 现在还无法通过局域网连接 # 去设置 cd ~/.vnc/ vim config # 打开最后一行注释 # 重新运行 vncserver -kill :1 vncserver 配置文件一览 # 将config文件最后一行的注释打开，即可
## Supported server options to pass to vncserver upon invocation can be listed ## in this file."><meta property="og:type" content="article"><meta property="og:url" content="http://example.org/docs/programmer/os/android/"><meta property="article:section" content="docs"><meta property="article:published_time" content="2018-05-15T09:56:41+00:00"><meta property="article:modified_time" content="2018-05-15T09:56:41+00:00"><title>安卓 | Ian's Blog</title>
<link rel=manifest href=/manifest.json><link rel=icon href=/favicon.png type=image/x-icon><link rel=stylesheet href=/book.min.c58292d36b18b675680ab9baea2029204537b839ea72f258746ec0f32ce8d6c8.css integrity="sha256-xYKS02sYtnVoCrm66iApIEU3uDnqcvJYdG7A8yzo1sg=" crossorigin=anonymous><script defer src=/flexsearch.min.js></script><script defer src=/en.search.min.80b0c12c6a3982c23bab5eb1d10c75b4cf8bfbaa1c7e183729648ce8a09207d7.js integrity="sha256-gLDBLGo5gsI7q16x0Qx1tM+L+6ocfhg3KWSM6KCSB9c=" crossorigin=anonymous></script></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/><span>Ian's Blog</span></a></h2><div class=book-search><input type=text id=book-search-input placeholder=Search aria-label=Search maxlength=64 data-hotkeys=s/><div class="book-search-spinner hidden"></div><ul id=book-search-results></ul></div><ul><li class=book-section-flat><a href=/docs/programmer/>程序员笔记</a><ul><li><input type=checkbox id=section-d5f99046a51e5e750b61f2e037945fcc class=toggle>
<label for=section-d5f99046a51e5e750b61f2e037945fcc class="flex justify-between"><a role=button>基础工具和配置</a></label><ul><li><a href=/docs/programmer/basetc/%E6%96%87%E6%9C%AC%E4%B8%89%E5%89%91%E5%AE%A2/>文本三剑客</a></li><li><a href=/docs/programmer/basetc/tmux/>Tmux使用笔记</a></li><li><a href=/docs/programmer/basetc/obsidian%E6%80%9D%E7%BB%B4%E5%AF%BC%E5%9B%BE%E6%8F%92%E4%BB%B6/>Obsidian思维导图插件</a></li><li><a href=/docs/programmer/basetc/for_china/>各个软件换源</a></li><li><a href=/docs/programmer/basetc/tipsofvim/>tip Of vim</a></li><li><a href=/docs/programmer/basetc/editer/>编辑器使用</a></li><li><a href=/docs/programmer/basetc/bash/>Bash</a></li><li><a href=/docs/programmer/basetc/gitbook/>Gitbook</a></li><li><a href=/docs/programmer/basetc/vim/>Vim</a></li><li><a href=/docs/programmer/basetc/%E5%AE%88%E6%8A%A4%E8%BF%9B%E7%A8%8B/>supervisor</a></li></ul></li><li><input type=checkbox id=section-8658298e10b544e890095f646916165a class=toggle>
<label for=section-8658298e10b544e890095f646916165a class="flex justify-between"><a href=/docs/programmer/cloudnative/>云原生</a></label><ul><li><input type=checkbox id=section-31d3b02fd4a132635e483e7e756058ea class=toggle>
<label for=section-31d3b02fd4a132635e483e7e756058ea class="flex justify-between"><a href=/docs/programmer/cloudnative/redis/>中间件</a></label><ul><li><a href=/docs/programmer/cloudnative/redis/python-redis-%E5%AE%A2%E6%88%B7%E7%AB%AF/>Python Redis 客户端</a></li><li><a href=/docs/programmer/cloudnative/redis/bigkey-and-hotkey/>大key、热key问题</a></li><li><a href=/docs/programmer/cloudnative/redis/the-basics-of-redis/>Redis基础</a></li><li><a href=/docs/programmer/cloudnative/redis/advanced-knowledge-of-redis/>Redis进阶</a></li><li><a href=/docs/programmer/cloudnative/redis/%E4%BD%BF%E7%94%A8%E5%91%BD%E4%BB%A4/>Redis常用命令</a></li></ul></li><li><input type=checkbox id=section-62d608ed890b3abc76dae78ccfcab912 class=toggle>
<label for=section-62d608ed890b3abc76dae78ccfcab912 class="flex justify-between"><a role=button>k8s</a></label><ul><li><a href=/docs/programmer/cloudnative/k8s/elk%E5%9C%A8k8s%E4%B8%8A%E7%9A%84%E9%83%A8%E7%BD%B2%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B/>elk在k8s上的部署使用示例</a></li><li><a href=/docs/programmer/cloudnative/k8s/k8s-%E9%85%8D%E5%A5%97%E8%AF%B4%E6%98%8E/>k8s 配套说明</a></li><li><a href=/docs/programmer/cloudnative/k8s/k8s-%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/>k8s技术分享</a></li><li><a href=/docs/programmer/cloudnative/k8s/k8s%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E5%92%8C%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%A7%A3%E6%9E%90/>k8s学习-常用命令和配置文件</a></li><li><a href=/docs/programmer/cloudnative/k8s/argo-workflow%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95%E5%92%8C%E4%BD%BF%E7%94%A8%E5%9C%BA%E6%99%AF%E5%88%86%E6%9E%90/>Argo Workflow性能测试和使用场景分析</a></li><li><a href=/docs/programmer/cloudnative/k8s/argo-%E4%BD%BF%E7%94%A8%E8%AE%B0%E5%BD%95/>Argo 使用记录</a></li></ul></li><li><input type=checkbox id=section-b828bf3d116bc282da9db25a06bf908e class=toggle>
<label for=section-b828bf3d116bc282da9db25a06bf908e class="flex justify-between"><a role=button>中间件</a></label><ul><li><a href=/docs/programmer/cloudnative/middleware/kafka-%E5%AE%89%E8%A3%85%E5%92%8C%E4%BD%BF%E7%94%A8/>Kafka 安装和使用</a></li></ul></li><li><a href=/docs/programmer/cloudnative/%E5%AE%B9%E5%99%A8/note-of-podman/>Podman</a></li><li><a href=/docs/programmer/cloudnative/nginx%E5%AE%9E%E7%94%A8%E9%85%8D%E7%BD%AE/>Nginx实用配置</a></li><li><a href=/docs/programmer/cloudnative/uwsgi-%E5%A4%84%E7%90%86%E8%AE%B0%E5%BD%95/>uwsgi 处理记录</a></li><li><a href=/docs/programmer/cloudnative/note-of-docker/>Docker</a></li><li><a href=/docs/programmer/cloudnative/%E5%AE%B9%E5%99%A8/note-of-docker/>Docker</a></li><li><a href=/docs/programmer/cloudnative/fastapi/>Django的建站的(｡･･)ﾉﾞ</a></li><li><a href=/docs/programmer/cloudnative/nginx-%E9%AB%98%E5%8F%AF%E7%94%A8/>Nginx高可用</a></li><li><a href=/docs/programmer/cloudnative/notesdjango/>Django的建站的(｡･･)ﾉﾞ</a></li><li><a href=/docs/programmer/cloudnative/sonar-%E4%BB%A3%E7%A0%81%E9%9D%99%E6%80%81%E6%A3%80%E6%9F%A5/>Sonar 代码静态检查</a></li></ul></li><li><input type=checkbox id=section-883e27361d38e16afb68faff3435ac0b class=toggle>
<label for=section-883e27361d38e16afb68faff3435ac0b class="flex justify-between"><a role=button>机器学习</a></label><ul><li><a href=/docs/programmer/ml/stable-diffusion/>AI画图</a></li><li><a href=/docs/programmer/ml/%E7%88%AC%E8%99%AB/>爬虫</a></li><li><a href=/docs/programmer/ml/paddle/>Paddle</a></li><li><a href=/docs/programmer/ml/tensorflow/>Tensorflow</a></li><li><a href=/docs/programmer/ml/opencv/>OpenCV</a></li><li><a href=/docs/programmer/ml/yolo/>Demo Test项目中的一些东西</a></li><li><a href=/docs/programmer/ml/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E5%B8%B8%E7%94%A8%E5%BA%93%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95/>机器学习库</a></li></ul></li><li><input type=checkbox id=section-0bf4f4329214e20fa67ca3e12c6aad0c class=toggle>
<label for=section-0bf4f4329214e20fa67ca3e12c6aad0c class="flex justify-between"><a role=button>平台</a></label><ul><li><a href=/docs/programmer/platforms/ubuntu/>Ubuntu</a></li><li><a href=/docs/programmer/platforms/%E9%98%BF%E9%87%8C%E4%BA%91%E4%BD%BF%E7%94%A8/>阿里云使用</a></li><li><a href=/docs/programmer/platforms/wps-for-linux/>WPS for Linux</a></li><li><a href=/docs/programmer/platforms/appsflyer/>AppsFlyer-外网移动归因营销分析平台</a></li></ul></li><li><input type=checkbox id=section-bf4e0d6f0b81f7b3ec08ed1fc66b874d class=toggle>
<label for=section-bf4e0d6f0b81f7b3ec08ed1fc66b874d class="flex justify-between"><a href=/docs/programmer/langs/>编程语言</a></label><ul><li><input type=checkbox id=section-771df6c720301e69f1715f7fc174ac3d class=toggle>
<label for=section-771df6c720301e69f1715f7fc174ac3d class="flex justify-between"><a role=button>Python</a></label><ul><li><a href=/docs/programmer/langs/python/sqlalchemy/>SqlAlchemy - 数据库Orm</a></li><li><a href=/docs/programmer/langs/python/pypi/>PyPi使用说明</a></li><li><a href=/docs/programmer/langs/python/pytest/>PyTest</a></li><li><a href=/docs/programmer/langs/python/paramiko-%E4%BD%BF%E7%94%A8-sshsftp/>Paramiko 使用 Ssh&amp;sftp</a></li><li><a href=/docs/programmer/langs/python/%E5%A4%9A%E7%BA%BF%E7%A8%8B%E5%A4%9A%E8%BF%9B%E7%A8%8B/>Python 多线程多进程</a></li><li><a href=/docs/programmer/langs/python/notespython/>Python 常用库</a></li><li><a href=/docs/programmer/langs/python/notespython/>Python 笔记</a></li><li><a href=/docs/programmer/langs/python/py%E5%B0%8F%E5%B7%A5%E5%85%B7%E5%92%8C%E5%8A%9F%E8%83%BD%E6%80%A7%E6%96%B9%E6%B3%95/>Py小工具和功能性方法</a></li><li><a href=/docs/programmer/langs/python/notespython/>解决问题</a></li></ul></li><li><input type=checkbox id=section-9f8ac8f06e138c7ac13ff61f23b4d497 class=toggle>
<label for=section-9f8ac8f06e138c7ac13ff61f23b4d497 class="flex justify-between"><a role=button>Golang</a></label><ul><li><a href=/docs/programmer/langs/golang/advanced-knowledge-of-golang/>Golang进阶笔记</a></li><li><a href=/docs/programmer/langs/golang/noteofgoexp/>Golang进阶笔记</a></li><li><a href=/docs/programmer/langs/golang/note-of-golang/>Golang笔记</a></li><li><a href=/docs/programmer/langs/golang/noteofgolang/>Golang笔记</a></li></ul></li><li><a href=/docs/programmer/langs/cmake/>CMake 使用Tips</a></li><li><a href=/docs/programmer/langs/tips-of-debugers/>Tips of debuggers</a></li><li><a href=/docs/programmer/langs/tips-of-markdown/>Tips of MarkDown</a></li><li><a href=/docs/programmer/langs/java/notesjava/>愉快的Java(happy to learn the fuck java)</a></li><li><a href=/docs/programmer/langs/note-for-fmtdata/>数据格式笔记</a></li></ul></li><li><input type=checkbox id=section-de7bfad1d124522974cdf8addfbb23f2 class=toggle>
<label for=section-de7bfad1d124522974cdf8addfbb23f2 class="flex justify-between"><a role=button>Net</a></label><ul><li><a href=/docs/programmer/net/%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B/>网络编程</a></li><li><a href=/docs/programmer/net/nginx%E5%AE%9E%E7%94%A8%E9%85%8D%E7%BD%AE/>Nginx实用配置</a></li><li><a href=/docs/programmer/net/tips-of-grpc/>gRpc使用小记</a></li><li><a href=/docs/programmer/net/epoll%E5%AE%9E%E7%8E%B0/>Epoll实现</a></li><li><a href=/docs/programmer/net/net/>Epoll实现</a></li></ul></li><li><input type=checkbox id=section-4446dd07527142b855f26d7cc8f0e617 class=toggle>
<label for=section-4446dd07527142b855f26d7cc8f0e617 class="flex justify-between"><a href=/docs/programmer/database/>Database</a></label><ul><li><a href=/docs/programmer/database/mongodb/>Mongodb使用记录</a></li><li><a href=/docs/programmer/database/dgraph/>Dgraph使用小记</a></li><li><a href=/docs/programmer/database/note-of-db-data-mongodb/>数据库-MongoDB篇</a></li><li><a href=/docs/programmer/database/note-of-db-data/>数据库-MongoDB篇</a></li><li><a href=/docs/programmer/database/note-of-db-data-mysql/>数据库-MySQL篇</a></li></ul></li><li><input type=checkbox id=section-7e5360c5e7954906b897ed79085884b6 class=toggle>
<label for=section-7e5360c5e7954906b897ed79085884b6 class="flex justify-between"><a href=/docs/programmer/gui/>图形用户界面-GUI</a></label><ul><li><a href=/docs/programmer/gui/pyinstaller-python%E6%89%93%E5%8C%85/>python打包</a></li><li><a href=/docs/programmer/gui/pyinstaller/>python打包</a></li><li><a href=/docs/programmer/gui/qt/>Qt/PySide</a></li><li><a href=/docs/programmer/gui/noteofvn_py/>Vn.Py学习笔记（Python交易平台框架）</a></li><li><a href=/docs/programmer/gui/vn.py%E7%AC%94%E8%AE%B0-%E4%BA%A4%E6%98%93%E5%B9%B3%E5%8F%B0%E5%AE%A2%E6%88%B7%E7%AB%AF/>Vn.Py学习笔记（Python交易平台框架）</a></li><li><a href=/docs/programmer/gui/notespython/>图形化界面 （Python Gui）</a></li><li><a href=/docs/programmer/gui/notespython/>图形化界面 （Python Gui）</a></li></ul></li><li><input type=checkbox id=section-ddcbe632dc99a9fb372422dada8ee641 class=toggle checked>
<label for=section-ddcbe632dc99a9fb372422dada8ee641 class="flex justify-between"><a role=button>OS操作系统问题处理</a></label><ul><li><a href=/docs/programmer/os/install_some/>安装问题</a></li><li><a href=/docs/programmer/os/android/ class=active>安卓</a></li><li><a href=/docs/programmer/os/freebsd/>FreeBSD</a></li><li><a href=/docs/programmer/os/note-of-linux/>Linux 笔记</a></li><li><a href=/docs/programmer/os/npm/>Npm</a></li><li><a href=/docs/programmer/os/git/>Git</a></li><li><a href=/docs/programmer/os/problem-of-windows/>Windows 爬坑记</a></li><li><a href=/docs/programmer/os/tips-of-problems/>解决问题记录笔记</a></li></ul></li><li><input type=checkbox id=section-d325c59fc6513e1b1e05a60b192d4973 class=toggle>
<label for=section-d325c59fc6513e1b1e05a60b192d4973 class="flex justify-between"><a href=/docs/programmer/hardware/>硬件</a></label><ul><li><a href=/docs/programmer/hardware/raspberrypi/>Raspberry Pi</a></li><li><a href=/docs/programmer/hardware/screen/>Screen</a></li></ul></li></ul></li><li class=book-section-flat><span>建模和游戏</span><ul><li><a href=/docs/3dgame/blender/>Blender</a></li><li><a href=/docs/3dgame/noteofue4/>UE4 笔记</a></li></ul></li><li class=book-section-flat><a href=/docs/example/>Hugo特殊Markdown语法说明</a><ul><li><a href=/docs/example/table-of-contents/>Table of Contents</a><ul><li><a href=/docs/example/table-of-contents/with-toc/>With ToC</a></li><li><a href=/docs/example/table-of-contents/without-toc/>Without ToC</a></li></ul></li><li><a href=/docs/example/shortcodes/buttons/>Buttons</a></li><li><a href=/docs/example/shortcodes/columns/>Columns</a></li><li><a href=/docs/example/shortcodes/details/>Details</a></li><li><a href=/docs/example/shortcodes/expand/>Expand</a></li><li><a href=/docs/example/shortcodes/hints/>Hints</a></li><li><a href=/docs/example/shortcodes/tabs/>Tabs</a></li></ul></li></ul><ul><li><a href=/posts/>Blog</a></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu>
</label><strong>安卓</strong>
<label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#termux>Termux</a><ul><li><a href=#xfce4>XFCE4</a></li><li><a href=#vnc>VNC</a></li><li><a href=#现在各个版本概览>现在各个版本概览</a></li><li><a href=#numpy>NumPy</a></li><li><a href=#c--opencv>C++ & OpenCV</a></li><li><a href=#ssh与手机连接>ssh与手机连接</a></li><li><a href=#快捷键有用的音量键>快捷键(有用的音量键？)</a></li></ul></li></ul></nav></aside></header><article class=markdown><h1 id=将安卓手机用于开发>将安卓手机用于开发
<a class=anchor href=#%e5%b0%86%e5%ae%89%e5%8d%93%e6%89%8b%e6%9c%ba%e7%94%a8%e4%ba%8e%e5%bc%80%e5%8f%91>#</a></h1><h2 id=termux>Termux
<a class=anchor href=#termux>#</a></h2><p>类似于WIN端的Subsystem——其实更像Ubuntu下的虚拟终端。 不过这东西功能强大，除了将安卓里的Linux发挥出来。还有Termux API来调用手机的底层接口。</p><h3 id=xfce4>XFCE4
<a class=anchor href=#xfce4>#</a></h3><p><strong>步骤</strong>：</p><ol><li>安装<code>Termux</code></li><li>执行<code>pkg update</code></li><li>执行<code>pkg install git && git clone https://github.com/Yisus7u7/termux-desktop-xfce.git</code></li><li>执行<code>cd termux-desktop-xfce && bash boostrap.sh</code></li></ol><p>当然，3&amp;4步可以合并为一句<code>curl -sLf https://raw.githubusercontent.com/Yisus7u7/termux-desktop-xfce/main/boostrap.sh | bash</code></p><h3 id=vnc>VNC
<a class=anchor href=#vnc>#</a></h3><p>默认VNC只能通过<code>localhost:1</code>来连接，局域网不能访问。想用大屏来看就不是很方便。</p><pre tabindex=0><code># 先执行`vncserver`使用本机的`VNC Viewer`看看效果，主要是需要先设置一下密码
vncserver
# 现在还无法通过局域网连接
# 去设置
cd ~/.vnc/
vim config # 打开最后一行注释
# 重新运行
vncserver -kill :1
vncserver
</code></pre><h4 id=配置文件一览>配置文件一览
<a class=anchor href=#%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e4%b8%80%e8%a7%88>#</a></h4><p>将<code>config</code>文件最后一行的注释打开，即可</p><pre tabindex=0><code>## Supported server options to pass to vncserver upon invocation can be listed
## in this file. See the following manpages for more: vncserver(1) Xvnc(1).
## Several common ones are shown below. Uncomment and modify to your liking.
##
# securitytypes=vncauth,tlsvnc
# desktop=sandbox
geometry=1280x720
# localhost
# alwaysshared 将这行注释取消注释
alwaysshared # 修改成这样
</code></pre><h3 id=现在各个版本概览>现在各个版本概览
<a class=anchor href=#%e7%8e%b0%e5%9c%a8%e5%90%84%e4%b8%aa%e7%89%88%e6%9c%ac%e6%a6%82%e8%a7%88>#</a></h3><ul><li>python - 3.10</li><li>clang - 14.0.5</li><li>opencv - 4.5.5</li></ul><h3 id=numpy>NumPy
<a class=anchor href=#numpy>#</a></h3><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#75715e># pip3 install numpy 不能安装</span>
</span></span><span style=display:flex><span>MATHLIB<span style=color:#f92672>=</span><span style=color:#e6db74>&#34;m&#34;</span> pip3 install numpy
</span></span><span style=display:flex><span><span style=color:#75715e># numpy      1.22.4</span>
</span></span></code></pre></div><h3 id=c--opencv>C++ & OpenCV
<a class=anchor href=#c--opencv>#</a></h3><p>现在安装<code>opencv-python</code>还有问题,可能问题出现在安装<code>numpy</code>上,但后来经过努力安装好了,但版本或者其他问题导致还是不能正常运行.但C++还是很好呀.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>pkg install opencv
</span></span></code></pre></div><h4 id=opcvcpp>opcv.cpp
<a class=anchor href=#opcvcpp>#</a></h4><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-cpp data-lang=cpp><span style=display:flex><span><span style=color:#75715e>#include</span> <span style=color:#75715e>&lt;opencv2/opencv.hpp&gt;</span><span style=color:#75715e>
</span></span></span><span style=display:flex><span><span style=color:#75715e>#include</span> <span style=color:#75715e>&lt;iostream&gt;</span><span style=color:#75715e>
</span></span></span><span style=display:flex><span><span style=color:#75715e></span>
</span></span><span style=display:flex><span><span style=color:#66d9ef>using</span> <span style=color:#66d9ef>namespace</span> cv;
</span></span><span style=display:flex><span><span style=color:#66d9ef>using</span> <span style=color:#66d9ef>namespace</span> std;
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#66d9ef>int</span> <span style=color:#a6e22e>main</span>()
</span></span><span style=display:flex><span>{
</span></span><span style=display:flex><span>		Mat src <span style=color:#f92672>=</span> imread(<span style=color:#e6db74>&#34;logo-red.png&#34;</span>, IMREAD_GRAYSCALE);
</span></span><span style=display:flex><span>		<span style=color:#66d9ef>if</span> (src.empty()) {
</span></span><span style=display:flex><span>				printf(<span style=color:#e6db74>&#34;could not find the image</span><span style=color:#ae81ff>\n</span><span style=color:#e6db74>&#34;</span>);
</span></span><span style=display:flex><span>				<span style=color:#66d9ef>return</span> <span style=color:#f92672>-</span><span style=color:#ae81ff>1</span>;
</span></span><span style=display:flex><span>		}
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>		imwrite(<span style=color:#e6db74>&#34;grayscale.png&#34;</span>, src);
</span></span><span style=display:flex><span>		printf(<span style=color:#e6db74>&#34;save grayscale success</span><span style=color:#ae81ff>\n</span><span style=color:#e6db74>&#34;</span>);
</span></span><span style=display:flex><span>		<span style=color:#75715e>// waitKey(0);
</span></span></span><span style=display:flex><span><span style=color:#75715e></span>		<span style=color:#75715e>// system(&#34;path&#34;);
</span></span></span><span style=display:flex><span><span style=color:#75715e></span>		<span style=color:#75715e>// getchar();
</span></span></span><span style=display:flex><span><span style=color:#75715e></span>		<span style=color:#66d9ef>return</span> <span style=color:#ae81ff>0</span>;
</span></span><span style=display:flex><span>}
</span></span></code></pre></div><h4 id=编译--运行>编译 & 运行
<a class=anchor href=#%e7%bc%96%e8%af%91--%e8%bf%90%e8%a1%8c>#</a></h4><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>g++ opcv.cpp -o opcv <span style=color:#e6db74>`</span>pkg-config --cflags --libs opencv4<span style=color:#e6db74>`</span>
</span></span><span style=display:flex><span>./opcv
</span></span></code></pre></div><h5 id=指定编译器版本>指定编译器版本
<a class=anchor href=#%e6%8c%87%e5%ae%9a%e7%bc%96%e8%af%91%e5%99%a8%e7%89%88%e6%9c%ac>#</a></h5><p>opencv4 需要C++11</p><pre tabindex=0><code>g++ opcv.cpp -o opcv `pkg-config --cflags --libs opencv4` -std=c++11
</code></pre><h3 id=ssh与手机连接>ssh与手机连接
<a class=anchor href=#ssh%e4%b8%8e%e6%89%8b%e6%9c%ba%e8%bf%9e%e6%8e%a5>#</a></h3><h4 id=手机端sshpc端>手机端<code>ssh</code>pc端
<a class=anchor href=#%e6%89%8b%e6%9c%ba%e7%ab%afsshpc%e7%ab%af>#</a></h4><ol><li>电脑生成密匙,无视密码设置全部回车</li></ol><pre tabindex=0><code>ssh-keygen -t rsa
</code></pre><ol start=2><li>电脑开启sshd服务,用于手机的ssh连接到电脑, 拷贝id_rsa.pub内容</li></ol><pre tabindex=0><code>systemctl start sshd
</code></pre><ol start=3><li>wsl: sshd re-exec requires execution with an absolute path</li><li>转去手机端操作</li><li>手机连接拷贝</li></ol><pre tabindex=0><code>$HOME/.ssh/authorized_keys -&gt; 不管用什么复制，然后放到这个路径就好。
</code></pre><ol start=6><li>查看手机的用户名</li></ol><pre tabindex=0><code>whoami
</code></pre><ol start=7><li>开启服务</li></ol><pre tabindex=0><code>sshd -p 9000
</code></pre><h4 id=pcssh手机端>pc<code>ssh</code>手机端
<a class=anchor href=#pcssh%e6%89%8b%e6%9c%ba%e7%ab%af>#</a></h4><pre tabindex=0><code>ssh u0_222@192.168.1.14 -p 9000
</code></pre><ul><li>可能有文件权限问题</li></ul><pre tabindex=0><code>chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
</code></pre><p>😓</p><h3 id=快捷键有用的音量键>快捷键(有用的音量键？)
<a class=anchor href=#%e5%bf%ab%e6%8d%b7%e9%94%ae%e6%9c%89%e7%94%a8%e7%9a%84%e9%9f%b3%e9%87%8f%e9%94%ae>#</a></h3><h4 id=显示扩展功能按键>显示扩展功能按键
<a class=anchor href=#%e6%98%be%e7%a4%ba%e6%89%a9%e5%b1%95%e5%8a%9f%e8%83%bd%e6%8c%89%e9%94%ae>#</a></h4><ul><li><p>方法一:
从左向右滑动,显示隐藏式导航栏,长按左下角的KEYBOARD.</p></li><li><p>方法二:
使用Termux快捷键:音量++Q键</p></li></ul><h4 id=常用快捷键>常用快捷键
<a class=anchor href=#%e5%b8%b8%e7%94%a8%e5%bf%ab%e6%8d%b7%e9%94%ae>#</a></h4><ul><li>Ctrl键是终端用户常用的按键 – 但大多数触摸键盘都没有这个按键。为此，Termux使用音量减小按钮来模拟Ctrl键。在触摸键盘上按音量减小+ L发送与在硬件键盘上按Ctrl + L相同的输入。</li><li>Ctrl+A -> 将光标移动到行首</li><li>Ctrl+C -> 中止当前进程</li><li>Ctrl+D -> 注销终端会话</li><li>Ctrl+E -> 将光标移动到行尾</li><li>Ctrl+K -> 从光标删除到行尾</li><li>Ctrl+L -> 清除终端</li><li>Ctrl+Z -> 挂起（发送SIGTSTP到）当前进程</li><li></li><li>加键也可以作为产生特定输入的特殊键.</li><li></li><li>音量加+E -> Esc键</li><li>音量加+T -> Tab键</li><li>音量加+1 -> F1（和音量增加+ 2→F2等）</li><li>音量加+0 -> F10</li><li>音量加+B -> Alt + B，使用readline时返回一个单词</li><li>音量加+F -> Alt + F，使用readline时转发一个单词</li><li>音量加+X -> Alt+X</li><li>音量加+W -> 向上箭头键</li><li>音量加+A -> 向左箭头键</li><li>音量加+S -> 向下箭头键</li><li>音量加+D -> 向右箭头键</li><li>音量加+L -> | （管道字符）</li><li>音量加+H -> 〜（波浪号字符）</li><li>音量加+U -> _ (下划线字符)</li><li>音量加+P -> 上一页</li><li>音量加+N -> 下一页</li><li>音量加+. -> Ctrl + \（SIGQUIT）</li><li>音量加+V -> 显示音量控制</li><li>音量加+Q -> 显示额外的按键视图</li></ul></article><footer class=book-footer><div class="flex flex-wrap justify-between"></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#termux>Termux</a><ul><li><a href=#xfce4>XFCE4</a></li><li><a href=#vnc>VNC</a></li><li><a href=#现在各个版本概览>现在各个版本概览</a></li><li><a href=#numpy>NumPy</a></li><li><a href=#c--opencv>C++ & OpenCV</a></li><li><a href=#ssh与手机连接>ssh与手机连接</a></li><li><a href=#快捷键有用的音量键>快捷键(有用的音量键？)</a></li></ul></li></ul></nav></div></aside></main></body></html>